import * as THREE from "three";
import Experience from "../Experience";
export default class Enviroment {
    constructor() {
        this.experience = Experience.instance;
        this.scene = this.experience.scene;
        this.resouces = this.experience.resources;
        this.setSunLight();
        this.setEnviromentMap();
    }
    setSunLight() {
        const sunLight = new THREE.DirectionalLight(0xffffff, 4);
        sunLight.castShadow = true;
        sunLight.shadow.mapSize.set(1024, 1024);
        sunLight.shadow.camera.near = 0.1;
        sunLight.position.set(3.5, 3, 1);
        sunLight.shadow.camera.far = 15;
        sunLight.shadow.normalBias = 0.05;
        this.scene.add(sunLight);
        
    }
}